<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>



<script>
var ss = "ABCDAXYZALDFADAA"
for (let i = 0; i < ss.length; i++) {
    if("A" === ss.charAt(i)){
        ss.replace("A","*")
    }
}
console.log(ss)
</script>
</body>
</html>